subgroup test abstract algebra